package com.bwie.controller;

import com.bwie.service.TbUserService;
import com.bwie.utils.ResultResponse;
import com.bwie.vo.LoginVo;
import com.bwie.vo.ResetPassWordVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@CrossOrigin
public class TbUserController {

    @Autowired
    TbUserService tbUserService;

    @PostMapping(value = "/userLogin")
    public ResultResponse userLogin(@RequestBody LoginVo loginVo) {
        return tbUserService.userLogin(loginVo);
    }
    @PostMapping(value = "/userResetPassWord")
    public ResultResponse userResetPassWord(@RequestBody ResetPassWordVo resetPassWordVo) {
        return tbUserService.userResetPassWord(resetPassWordVo);
    }
}
